package org.example.service;

import org.example.entity.Major;
import org.example.entity.Teachers;
import org.example.mapper.MaMapper;
import org.example.mapper.TeaMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TeaServiceImpl implements TeaService {
    @Resource
    private TeaMapper teaMapper;
    @Resource
    private MaMapper maMapper;

    @Override
    public int add(Teachers teachers) {
        return teaMapper.add(teachers);
    }

    @Override
    public int delete(Long tid) {
        return teaMapper.delete(tid);
    }

    @Override
    public int update(Teachers teachers) {
        return teaMapper.update(teachers);
    }

    @Override
    public Teachers get(Long tid) {
        return teaMapper.get(tid);
    }

    @Override
    public List<Teachers> getList(Teachers teachers) {
        return teaMapper.getList(teachers);
    }

    @Override
    public List<Major> getAll() {
        return maMapper.getAll();
    }
}
